﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EnhancedSolutions
{
    class ExtractedSolutionList : IEnumerable<ExtractedSolution>
    {
        private List<ExtractedSolution> list;

        public ExtractedSolutionList()
        {
            this.list = new List<ExtractedSolution>();
        }

        public void Add(ExtractedSolution solution)
        {
            this.list.Add(solution);
        }

        public void RemoveAll()
        {
            foreach (ExtractedSolution solution in this.list)
            {
                solution.Dispose();
            }
        }

        public IEnumerator<ExtractedSolution> GetEnumerator()
        {
            return list.GetEnumerator();
        }

        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
        {
            return list.GetEnumerator();
        }
    }
}
